<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Light.master" CodeFile="Login.aspx.cs" Inherits="Login" %>

<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
    <div class="accountHeader">
        <h2>Log In</h2>
        <p>
        Please enter your username and password. 
		<a href="Register.aspx">Register</a> if you don't have an account.</p>
    </div>
    <dx:ASPxComboBox ID="cbb_fio" runat="server" Height="18px" Width="200px" AutoPostBack="True" 
        AutoResizeWithContainer="True" EnableClientSideAPI="True" ValueType="System.Int32" DropDownStyle="DropDown" 
        IncrementalFilteringMode="StartsWith" OnSelectedIndexChanged="cbb_fio_SelectedIndexChanged"
        TextField ="FIO" ValueField="CODE">
    </dx:ASPxComboBox>
    <dx:ASPxLabel ID="lblUserName" runat="server" AssociatedControlID="tbUserName" Text="User Name:" />
    <div class="form-field">
        <dx:ASPxTextBox ID="tbUserName" runat="server" Width="200px">
            <ValidationSettings ValidationGroup="LoginUserValidationGroup">
                <RequiredField ErrorText="User Name is required." IsRequired="true" />
            </ValidationSettings>
        </dx:ASPxTextBox>
    </div>
    <dx:ASPxLabel ID="lblPassword" runat="server" AssociatedControlID="tbPassword" Text="Password:" />
    <div class="form-field">
        <dx:ASPxTextBox ID="tbPassword" runat="server" Password="true" Width="200px">
            <ValidationSettings ValidationGroup="LoginUserValidationGroup">
                <RequiredField ErrorText="Password is required." IsRequired="true" />
            </ValidationSettings>
        </dx:ASPxTextBox>
    </div>
    <div>
        <dx:ASPxComboBox ID="cbb_kontr" runat="server" AutoPostBack="True" EnableClientSideAPI="True" Height="18px"
        Width="200px" AutoResizeWithContainer="True" ValueType="System.Int32">
        </dx:ASPxComboBox>
    </div>
    <dx:ASPxButton ID="btnLogin" runat="server" Text="Log In" ValidationGroup="LoginUserValidationGroup"
    OnClick="btnLogin_Click">
    </dx:ASPxButton>
<%--    <asp:SqlDataSource ID="ds_piple" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringDez %>" ProviderName="<%$ ConnectionStrings:ConnectionStringDez.ProviderName %>" SelectCommand="SELECT W.CODE, 
       W.KONTRAGENT, k.NAME,
       W.PIPLE, (P.F || ' ' || P.I || ' ' || P.O) FIO,
       W.USERNAME

FROM WORKER W
left outer join piple p on p.CODE = w.PIPLE
left outer join KONTRAGENT k on k.CODE = w.KONTRAGENT
WHERE w.PIPLE =  121">
        <SelectParameters>
            <asp:Parameter DefaultValue="121" Name="piple" />
        </SelectParameters>
    </asp:SqlDataSource>--%>
</asp:Content>